Exercises for Local Search for
n
-Queens Problem
Board size:
Maximum number of trials:
Let's start the exercise by reading the above inputs.
Execute the code
Exercise 2 - Initialize the board
: This exercise should be done after the above Exercise.
Execute the code
Exercise 3 - Count the number of conflicts with the queen in the specified column
: This exercise should be done after Exercise 2.
Execute the code
Exercise 4 - Goal test
: This exercise should be done after Exercise 3.
Execute the code
Exercise 5 - Improve the board over the specified column
: This exercise should be done after Exercise 4.
Execute the code
Exercise 6 - Local search
: This exercise should be done after Exercise 5.
Execute the code